﻿@using System.Web.Mvc
@using System.Web.Mvc.Html
@using System.Web.UI.WebControls
@model TPM.Models.Equipo

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Equipo</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.Label("Categoria")
            @Html.DropDownListFor(model => model.CategoriaId, new SelectList(Model.CategoriaLista,"CategoriaId","NombreCategoria"))
        </div>       
        <div class="editor-label">
            @Html.Label("Division")
            @Html.DropDownListFor(model => model.DivisionId, new SelectList(
                Model.DivisionLista,
                "DivisionId",
                "NombreDivision"))
        </div>       
        <div class="editor-label">
            @Html.Label("Liga")
            @Html.DropDownListFor(model => model.LigaId, new SelectList(
              Model.LigaLista,
              "LigaId",
              "NombreLiga"))
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
